package com.qiaofang.constant;

public enum WxConfigEnum {
    CLOSE("0", "关闭"),
    OPEN("1", "开启");

    private String code;
    private String name;

    WxConfigEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static WxConfigEnum getByCode(String code) {
        for (WxConfigEnum item : WxConfigEnum.values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }
}
